
#ifndef AUTOLAMPS_H
#define AUTOLAMPS_H

#include "p18f4550.h"

void autolamps_run();
void autolamps_init();
void apptask_autolamps();
enum states{
OFF,
PARKLAMPS,
HEADLAMPS,
AUTO,
RESET
};

 enum states2{
LIGHTSOFF,
HALFLIGHT,
LIGHTSON
} ;



#define PERC40 102
#define PERC60 153
#define PERC80 204
#define GET_INPUT (PORTCbits.RC6*2)+(PORTCbits.RC2)
#define OUT_PORT LATB
#define TURN_PARKLAMPS 3*16
#define TURN_OFF 0
#define TURN_HEADLAMPS 12*16
#define TURN_ALLLAMPS 15*16
#define GET_ADC_INFO ADCON0bits.GO_DONE = 1;while(ADCON0bits.GO_DONE );
#define RESET_WARNING 9*16
#define ADC_RESULT ADRESH

#endif